home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.0 / PInterfaces / TSMTE.p < prev    next >
Encoding:
Text File  |  1995-04-18  |  3.7 KB  |  154 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        TSMTE.p
  3.  
  4.      Contains:    Text Services Managerfor TextEdit Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT TSMTE;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __TSMTE__}
  30. {$SETC __TSMTE__ := 1}
  31.  
  32. {$I+}
  33. {$SETC TSMTEIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __TEXTEDIT__}
  38. {$I TextEdit.p}
  39. {$ENDC}
  40. {    Types.p                                                        }
  41. {        ConditionalMacros.p                                        }
  42. {    Quickdraw.p                                                    }
  43. {        MixedMode.p                                                }
  44. {        QuickdrawText.p                                            }
  45.  
  46. {$IFC UNDEFINED __DIALOGS__}
  47. {$I Dialogs.p}
  48. {$ENDC}
  49. {    Errors.p                                                    }
  50. {    Memory.p                                                    }
  51. {    Windows.p                                                    }
  52. {        Events.p                                                }
  53. {            OSUtils.p                                            }
  54. {        Controls.p                                                }
  55. {            Menus.p                                                }
  56.  
  57. {$IFC UNDEFINED __APPLEEVENTS__}
  58. {$I AppleEvents.p}
  59. {$ENDC}
  60. {    EPPC.p                                                        }
  61. {        AppleTalk.p                                                }
  62. {        Files.p                                                    }
  63. {        PPCToolbox.p                                            }
  64. {        Processes.p                                                }
  65. {    Notification.p                                                }
  66.  
  67. {$IFC UNDEFINED __TEXTSERVICES__}
  68. {$I TextServices.p}
  69. {$ENDC}
  70. {    Components.p                                                }
  71.  
  72. {$PUSH}
  73. {$ALIGN MAC68K}
  74. {$LibExport+}
  75.  
  76. CONST
  77.     kTSMTESignature                = 'tmTE';
  78.     kTSMTEInterfaceType            = 'tmTE';
  79.     kTSMTEDialog                = 'tmDI';
  80.  
  81.  
  82. CONST
  83.     gestaltTSMTEAttr            = 'tmTE';
  84.     gestaltTSMTEPresent            = 0;
  85.     gestaltTSMTE                = 0;                            { gestaltTSMTE is old name for gestaltTSMTEPresent }
  86.  
  87.     gestaltTSMTEVersion            = 'tmTV';
  88.     gestaltTSMTE1                = $100;
  89.  
  90.     kTSMTEAutoScroll            = 1;
  91.  
  92. { callback procedure definitions}
  93. TYPE
  94.     TSMTEPreUpdateProcPtr = ProcPtr;  { PROCEDURE TSMTEPreUpdate(textH: TEHandle; refCon: LONGINT); }
  95.     TSMTEPostUpdateProcPtr = ProcPtr;  { PROCEDURE TSMTEPostUpdate(textH: TEHandle; fixLen: LONGINT; inputAreaStart: LONGINT; inputAreaEnd: LONGINT; pinStart: LONGINT; pinEnd: LONGINT; refCon: LONGINT); }
  96.     TSMTEPreUpdateUPP = UniversalProcPtr;
  97.     TSMTEPostUpdateUPP = UniversalProcPtr;
  98.  
  99.     TSMTERec = RECORD
  100.         textH:                    TEHandle;
  101.         preUpdateProc:            TSMTEPreUpdateUPP;
  102.         postUpdateProc:            TSMTEPostUpdateUPP;
  103.         updateFlag:                LONGINT;
  104.         refCon:                    LONGINT;
  105.     END;
  106.  
  107.     TSMTERecPtr = ^TSMTERec;
  108.     TSMTERecHandle = ^TSMTERecPtr;
  109.  
  110.     TSMDialogRecord = RECORD
  111.         fDialog:                DialogRecord;
  112.         fDocID:                    TSMDocumentID;
  113.         fTSMTERecH:                TSMTERecHandle;
  114.         fTSMTERsvd:                ARRAY [0..2] OF LONGINT;                { reserved}
  115.     END;
  116.  
  117.     TSMDialogPeek = ^TSMDialogRecord;
  118.  
  119.  
  120. CONST
  121.     uppTSMTEPreUpdateProcInfo = $000003C0; { PROCEDURE (4 byte param, 4 byte param); }
  122.     uppTSMTEPostUpdateProcInfo = $000FFFC0; { PROCEDURE (4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param, 4 byte param); }
  123.  
  124. FUNCTION NewTSMTEPreUpdateProc(userRoutine: TSMTEPreUpdateProcPtr): TSMTEPreUpdateUPP;
  125.     {$IFC NOT GENERATINGCFM }
  126.     INLINE $2E9F;
  127.     {$ENDC}
  128.  
  129. FUNCTION NewTSMTEPostUpdateProc(userRoutine: TSMTEPostUpdateProcPtr): TSMTEPostUpdateUPP;
  130.     {$IFC NOT GENERATINGCFM }
  131.     INLINE $2E9F;
  132.     {$ENDC}
  133.  
  134. PROCEDURE CallTSMTEPreUpdateProc(textH: TEHandle; refCon: LONGINT; userRoutine: TSMTEPreUpdateUPP);
  135.     {$IFC NOT GENERATINGCFM}
  136.     INLINE $205F, $4E90;
  137.     {$ENDC}
  138.  
  139. PROCEDURE CallTSMTEPostUpdateProc(textH: TEHandle; fixLen: LONGINT; inputAreaStart: LONGINT; inputAreaEnd: LONGINT; pinStart: LONGINT; pinEnd: LONGINT; refCon: LONGINT; userRoutine: TSMTEPostUpdateUPP);
  140.     {$IFC NOT GENERATINGCFM}
  141.     INLINE $205F, $4E90;
  142.     {$ENDC}
  143.  
  144. {$ALIGN RESET}
  145. {$POP}
  146.  
  147. {$SETC UsingIncludes := TSMTEIncludes}
  148.  
  149. {$ENDC} {__TSMTE__}
  150.  
  151. {$IFC NOT UsingIncludes}
  152.  END.
  153. {$ENDC}
  154.